import request from '@/utils/request'
import formurlencoded from 'form-urlencoded'

//退货列表list
export function listProductBack(query) {
  return request({
    url: '/admin/order/productBack/list',
    method: 'get',
    params: query
  })
}

//退货退款操作
export function backmoneyProductBack(data) {
  return request({
    url: '/admin/order/productBack/backmoney',
    method: 'post',
    data: formurlencoded(data)
  })
}

//退货详情
export function detailsProductBack(query) {
  return request({
    url: '/admin/order/productBack/details',
    method: 'get',
    params: query
  })
}

//换货列表list
export function listProductExchange(query) {
  return request({
    url: '/admin/order/productExchange/list',
    method: 'get',
    params: query
  })
}

//换货详情
export function detailsProductExchange(query) {
  return request({
    url: '/admin/order/productExchange/details',
    method: 'get',
    params: query
  })
}

//投诉管理列表list
export function listComplaint(query) {
  return request({
    url: '/admin/order/complaint/list',
    method: 'get',
    params: query
  })
}

//投诉管理详情
export function detailsComplaint(query) {
  return request({
    url: '/admin/order/complaint/details',
    method: 'get',
    params: query
  })
}

//审核页面取数据
export function auditPageComplaint(query) {
  return request({
    url: '/admin/order/complaint/auditPage',
    method: 'get',
    params: query
  })
}

//投诉仲裁操作
export function doAuditComplaint(data) {
  return request({
    url: '/admin/order/complaint/doAudit',
    method: 'post',
    data: formurlencoded(data)
  })
}

//重置投诉信息页面获取数据
export function resetComplaint(data) {
  return request({
    url: '/admin/order/complaint/reset',
    method: 'post',
    data: formurlencoded(data)
  })
}

//执行重置申诉操作
export function doresetComplaint(data) {
  return request({
    url: '/admin/order/complaint/doreset',
    method: 'post',
    data: formurlencoded(data)
  })
}

//取所有商家
export function getSellers(query) {
  return request({
    url: 'admin/seller/manage/getSellers',
    method: 'get',
    params: query
  })
}
